home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 53 / 053.d81 / morse code (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  261 lines

  1. 10 gosub2130:print"[147]":poke53281,.:poke53280,.
  2. 20 diml$(38),m$(38),w$(200),l1$(38),h$(200):print"[147]","   [208]lease wait
  3. 30 s1[178]54272:[129]l[178]s1[164]s1[170]24:[151]l,.:[130]:[151]s1[170]24,15:[151]s1[170]5,.
  4. 40 [151]s1[170]6,240:[151]s1[170]3,8:[129]l[178].[164]8:[135]a(l):[130]:dt$[178]".":ds$[178]"-"
  5. 50 [129]l[178]0[164]38:[135]l$(l),m$(l):l1$(l)[178][199]([198](l$(l))[170]128):[130]
  6. 60 sp$[178]"                                       "
  7. 70 [135]w$(z):[139]w$(z)[179][177]"#"[167]z[178]z[170]1:[137]70
  8. 80 [135] h$(t)
  9. 90 [139]h$(t)[178]"#"[167]h$(t)[178]h$(t[171]1)
  10. 100 [139]h$(t)[179][177]"%"[167]t[178]t[170]1:[137]80
  11. 110 pu[178]z:[153]"stopload"[199](8)[199](14):[141]390:l5[178].:m5[178].:k[178].:tl$[178]""
  12. 120 [153]"sys  right$nternational (NULL)orse lenode (NULL)ranslater":
  13. 130 [153][163]10)"listpeeky mid$ames len. right$anni
  14. 140 print"[159]                [205]enu[146]"
  15. 150 print" [153]1.[150]  [211]ee chart"
  16. 160 print" [153]2.[150]  [212]ranslate from [197]nglish to [205]orse":c$="[144]"
  17. 170 print" [153]3.[150]  [212]ranslate from [205]orse to [197]nglish"
  18. 180 print" [153]4.[150]  [212]est your ability to translate"
  19. 190 print" [153]5.[150]  [195]ustomize [205]orse [195]ode keys"
  20. 191 print" [153]6.[150]  [209][213][201][212]":gosub390
  21. 200 print" [208]lease select your choice :":print""sp$
  22. 210 geta$:ifa$=""then210
  23. 220 ifa$<"1"ora$>"6"then210
  24. 230 lc=s1+1309+(val(a$)-1)*80:forl=lctolc+34:pokel,1:next:ford=1to300:next
  25. 240 onval(a$)goto770,870,1140,1490,3000,1420
  26. 250 print"[175][153][157]";:t$="":p$="":ct=0:c1=0
  27. 260 geta$:gosub360:ifa$=""then260
  28. 270 l=len(t$):a=asc(a$):if(a=47ora=63)andtt=1thengosub2000:goto260
  29. 280 ifa=13andl>.thenprint" ";:return
  30. 290 if(a=20ora=95)andl>.thent$=left$(t$,l-1):a$=chr$(20):goto350
  31. 300 ifa$=" "andl<tl+1then340
  32. 310 ifl>tlthen260
  33. 311 ifm5=0then330
  34. 312 ifa=asc(ds$)thena=45:a$=chr$(a)
  35. 313 ifa=asc(dt$)thena=46:a$=chr$(a)
  36. 320 ifa<>45anda<>46then260
  37. 330 ifl5=1thenif(a<65ora>90)and(a<48ora>57)and(a<>46)and(a<>63)and(a<>44)then260
  38. 340 t$=t$+a$:ifm5=1thengosub450
  39. 350 print"[153]"a$;:print"[175][153][157]";:goto260
  40. 360 ct=ct+1:ifct<3thenreturn
  41. 370 ct=.:c1=c1+1:ifc1>8thenc1=.
  42. 380 poke646,a(c1):print"[175][157]";:return
  43. 390 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][154]";:return
  44. 400 print".";
  45. 410 pokes1+1,50:pokes1+4,65:fort=1to73:next:pokes1+4,64:return
  46. 420 print"-";
  47. 430 pokes1+1,50:pokes1+4,65:fort=1to187:next:pokes1+4,64:return
  48. 440 fort=1to163:next:return
  49. 450 ifa$="."thengosub410:return
  50. 460 ifa$="-"thengosub430:return
  51. 470 return
  52. 480 data0,11,12,15,1,1,12,11,0
  53. 490 dataa,.-,b,-...,c,-.-.,d,-..,e,.,f,..-.,g,--.,h,....,i,..,j,.---
  54. 500 datak,-.-,l,.-..,m,--,n,-.,o,---,p,.--.,q,--.-,r,.-.,s,...,t,-
  55. 510 datau,..-,v,...-,w,.--,x,-..-,y,-.--,z,--..
  56. 520 data0,-----,1,.----,2,..---,3,...--,4,....-,5,.....,6,-....,7,--...
  57. 530 data8,---..,9,----.,",",--..--,".",.-.-.-,?,..--..
  58. 540 datathe,quick,brown,fox,jumped,over,three,lazy,dogs,hello,help
  59. 550 datastranded,island,mayday,send,off,on,goodby,monday,tuesday,thursday
  60. 560 datafriday,saturday,sunday,wednesday,september,october,november,december
  61. 570 datajanuary,february,march,april,may,june,july,august,summer,winter,fall
  62. 580 dataspring,computer,softdisk,yesterday,tomorrow,today,yellow,blue,red
  63. 590 datagreen,copper,iron,gold,silver,bomb,explosive,dynamite,big,small,little
  64. 600 data123,234,345,456,567,678,789,890,153,523,764,".",","
  65. 610 datagiant,guard,ocean,pool,window,pencil,pen,whale,shark,football,baseball
  66. 620 data"#"
  67. 630 dataan article,adjective,color,animal,past verb,adverb,spelled out number
  68. 640 dataadjective,animal,greeting,"*[211]end [198]or ----!"
  69. 650 data"*[212]his usually happens on a island","*[193] piece of land",help signal
  70. 660 dataverb,adverb,adverb,"*[193]dios!","*[196]ay of a week","#"
  71. 670 data"#","#","#","#","#","month","#","#","#","#","#","#","#","#","#","#","#"
  72. 680 dataseason,"#","#","#","*[217]ou are now playing with this","*[193]n awesome company"
  73. 690 data"*[206]ot tomorrow","*[206]ot yesterday","*[201]t's a news show",color,"#","#"
  74. 700 data"#",metal,"#","#","#","*[203][193][193][208][207][207][215]!","*[203][193][193][194][207][207][205]!","*[203][193][193][208][207][215][201][197]",adjective
  75. 710 data"#","#",number,"#","#","#","#","#","#","#","#","#","#",punctuation,"#"
  76. 720 dataadjective,verb,"*[199]igantic body of water","*[204]ots of [195]hlorine"
  77. 730 data"*[217]ou look through this","*[217]ou write with this"
  78. 740 data"#",mammal,fish,"*[201]t's usually played in winter"
  79. 750 data"*[201]t's usually played in spring"
  80. 760 data"%"
  81. 770 print"[147][159]     [201]nternational [205]orse [195]ode [195]hart":gosub390:print""
  82. 780 forl=0to12:print"  "l1$(l)" "m$(l)tab(15)""l1$(l+13)" "m$(l+13)tab(28);
  83. 790 print""l$(l+26)" "m$(l+26):next:ifrtthenrt=0:return
  84. 800 print""
  85. 810 print"[158]            [208]ress [193]ny [203]ey               ";:poke198,0
  86. 820 wait198,255:poke198,0:goto110
  87. 830 foru=1to10
  88. 840 fort=1264+l-len(tl$)to1264+l-1:poket,peek(t)and127:poket+s1,7:next
  89. 850 fort=1264+l-len(tl$)to1264+l-1:poket,peek(t)or128:poket+s1,10
  90. 860 next:next:pokes1+4,32:l=l+1:tl$="":k=.:goto1270
  91. 870 l5=1:tl=78+80
  92. 880 print"[147][159][212]ype in an [197]nglish sentence then ":x1=0:c$="[159]"
  93. 890 print"press [150][210][197][212][213][210][206][146][159] when done."
  94. 900 gosub250:print:gosub1340
  95. 910 forl=1tolen(t$):p$=mid$(t$,l,1)
  96. 920 ifp$=chr$(32)then1040
  97. 930 k=k+1
  98. 940 ifp$=l$(k-1)then980
  99. 950 ifk<39then930
  100. 960 ifrtthenrt=0:return
  101. 970 goto800
  102. 980 ifpos(x)>33andc$="[159]"thenprint:print"":poke199,1:x1=x1+1:ifx1>3thenx1=.:goto1000
  103. 990 m$=m$(k-1):print"[145]"c$;p$"[157][157]";:gosub1100:k=0:nextl:goto960
  104. 1000 print""
  105. 1010 print"[129]       [208]ress any key to continue.      ":poke198,0:wait198,255
  106. 1020 x1=0:print"[145][146]                                       ":gosub1340
  107. 1030 goto980
  108. 1040 ifpos(x)>33thenprint:print"":poke199,1:x1=x1+1:ifx1>3thenx1=0:goto1060
  109. 1050 print" ";:gosub440:k=0:nextl:goto960
  110. 1060 print""
  111. 1070 print"[129]       [208]ress any key to continue.      ":poke198,0:wait198,255
  112. 1080 x1=0:print"[145][146]                                       ":gosub1340
  113. 1090 k=0:nextl:goto960
  114. 1100 print" ";:form=1tolen(m$):p$=mid$(m$,m,1)
  115. 1110 ifp$="-"thengosub420
  116. 1120 ifp$="."thengosub400
  117. 1130 next:return
  118. 1140 m5=1:tl=150:sp=0
  119. 1150 print"[147][159][212]ype in [205]orse [195]ode press [210][197][212][213][210][206][146][159]"
  120. 1160 print"    when done.":gosub1300:poke214,10:print:rt=1:gosub780
  121. 1170 print"":gosub250:print:gosub1380
  122. 1180 forl=1tolen(t$):p$=mid$(t$,l,1):ifp$=" "andtl$=""thenprint" ";:nextl:goto1260
  123. 1190 ifp$=" "orp$=""thengosub1210:nextl:goto1260
  124. 1200 tl$=tl$+p$:nextl:sp=1
  125. 1210 k=.
  126. 1220 k=k+1
  127. 1230 iftl$=m$(k-1)thenprintl$(k-1);:tl$="":goto1270
  128. 1240 ifk<39then1220
  129. 1250 print"[150]*[197][210][210]*";:pokes1+1,3:pokes1+4,33:l=l-1:goto830
  130. 1260 goto800
  131. 1270 ifmid$(t$,l+1,1)=" "thenprint" ";:l=l+1:goto1270
  132. 1280 ifsp=1then800
  133. 1290 return
  134. 1300 print"[159][208]ut 2 spaces before each [158]word."
  135. 1310 print"[159][208]ut 1 space before each [158]letter."
  136. 1320 print"[129][213]se the '"dt$"' and '"ds$"' keys."
  137. 1330 return
  138. 1340 print"":fort=1to12
  139. 1350 print"[159]                                       ":next:print""
  140. 1360 print"[155] [212]ranslation is:                       ":poke199,1
  141. 1370 return
  142. 1380 print"":fort=1to12
  143. 1390 print"[159]                                        ";:next:print""
  144. 1400 print"[155] [212]ranslation is:                        ";
  145. 1410 return
  146. 1420 print" [196]o you wish to quit to [158][204][207][193][196][211][212][193][210]? [152]([217]/[206])"
  147. 1430 geta$:ifa$=""then1430
  148. 1440 ifa$="[217]"ora$="y"then 1460
  149. 1450 ifa$="n"ora$="[206]"thenprint"";:goto 130
  150. 1460 open15,8,15,"r0:hello connect=hello connect":input#15,er,er$:close15
  151. 1470 ifer<>63 then print"[147]":end
  152. 1480 load"hello connect",8,1
  153. 1490 print"[144][147][158]         *** [205]orse [195]ode [212]ests ***   ":gosub390:tt=0
  154. 1500 print" [193].[